//////////////////////////////////////////////////////////////////////////////////////////////
//	File			:	"Entity.h"
//
//	Author			:	Mike Davis, Matt Stover, James Thornton, Keith Webster
//	
//	Project			:	TacWars
//
//	Last Modified	:	11/6/2013
//
//	Purpose			:	
//
//////////////////////////////////////////////////////////////////////////////////////////////
#include "IEntity.h"
class Player;
class Entity : public IEntity
{
public:

	//IEntity shit
	virtual void Update( float fElapsedTime );
	virtual void Render( void );
	virtual RECT GetRect( void ) const;
	virtual void HandleCollision( const IEntity* pOther );
	virtual void AddRef ( void );
	virtual void Release( void );

	Entity();
	virtual ~Entity();


	virtual int GetType() const {return Type;}
	virtual int GetStateID()const	{return State;}
	
	virtual void Move();
	virtual void Attack();
	virtual void UseAbility();
	virtual void Capture();








	int GetMoveRange()			const { return moveRange;		}
	int GetAttackRange()		const { return attackRange;		}
	int GetAttackDamage()		const { return attackDamage;	}
	int GetHealth()				const { return Health;			}
	int GetLoyalty()			const { return Loyalty;			}
	int GetAbilityCooldown()	const { return abilityCooldown; }
	int GetAbilityRange()		const { return abilityRange;	}
	int GetImageID()			const { return imageID;			}
	int GetPosX()				const { return posX;			}
	int GetPosY()				const { return posY;			}
	bool GetHasFlag()			const { return hasFlag;			}
	bool GetIsBuffed()			const { return isBuffed;		}
	bool GetIsScared()			const { return isScared;		}

	void SetMoveRange			(int v	)	{	moveRange = v;			}
	void SetAttackRange			(int v	)	{	attackRange = v;		}
	void SetHealth				(int v	)	{	Health = v;				}
	void SetLoyalty				(int v	)	{	Loyalty = v;			}
	void SetAbilityCooldown		(int v	)	{	abilityCooldown = v;	}
	void SetPosX				(int v	)	{	posX = v;				}
	void SetPosY				(int v	)	{	posY = v;				}
	void SetHasFlag				(bool v	)	{	hasFlag = v;			}
	void SetIsBuffed			(bool v	)	{	isBuffed = v;			}
	void SetIsScared			(bool v	)	{	isScared = v;			}

protected:
	enum entityType{GENERAL, BERSERKER, KNIGHT, PRIEST, RANGER};
	entityType		Type;

	enum entityState{IDLE, MOVE, ACTION, ATTACK, ABILITY, FINISH, DEAD};
	entityState		State;

private:
	int moveRange, attackRange, attackDamage, Health, Loyalty, abilityCooldown, 
		abilityRange, imageID, posX, posY;
	bool hasFlag, isBuffed, isScared;
	float Height, Width;

	unsigned int	refCount;

	Player* Owner;
};